package com.itheima.day04_array;

public class Demo4_Index {
    public static void main(String[] args) {
        int[] arr = {12, 34, 55};
        System.out.println("arr[0] = " + arr[0]);
        System.out.println("arr[1] = " + arr[1]);
        System.out.println("arr[2] = " + arr[2]);

//        System.out.println("arr[3] = " + arr[3]);

        arr[0] = 23;
        arr[2] = 33;
        System.out.println("arr[0] = " + arr[0]);
        System.out.println("arr[1] = " + arr[1]);
        System.out.println("arr[2] = " + arr[2]);

        System.out.println("arr.length = " + arr.length);

        System.out.println("arr.length - 1 = " + (arr.length - 1));

        int[] arr2 = {};
        System.out.println("(arr2.length - 1) = " + (arr2.length - 1));
    }
}
